Scanning Projectors And Image Capture Modules For 3D Mapping

ABSTRACT

Apparatus ( 20 ) for mapping includes an illumination module ( 30 ), which includes a radiation source ( 32 ), which is configured to emit a beam of radiation. A scanner ( 34 ) receives and scans the beam over a selected angular range. Illumination optics ( 35 ) project the scanned beam so as to create a pattern of spots extending over a region of interest. An imaging module ( 38 ) captures an image of the pattern that is projected onto an object ( 28 ) in the region of interest. A processor ( 46 ) processes the image in order to construct a three-dimensional (3D) map of the object.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional PatentApplication 61/372,729, filed Aug. 11, 2010, and U.S. Provisional PatentApplication 61/425,788, filed Dec. 22, 2010, both of which areincorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates generally to methods and devices forprojection and capture of optical radiation, and particularly toprojection and image capture for purposes of 3D mapping.

BACKGROUND

Various methods are known in the art for optical 3D mapping, i.e.,generating a 3D profile of the surface of an object by processing anoptical image of the object. This sort of 3D profile is also referred toas a 3D map, depth map or depth image, and 3D mapping is also referredto as depth mapping.

Some methods of 3D mapping are based on projecting a laser specklepattern onto the object, and then analyzing an image of the pattern onthe object. For example, PCT International Publication WO 2007/043036,whose disclosure is incorporated herein by reference, describes a systemand method for object reconstruction in which a coherent light sourceand a generator of a random speckle pattern project onto the object acoherent random speckle pattern. An imaging unit detects the lightresponse of the illuminated region and generates image data. Shifts ofthe pattern in the image of the object relative to a reference image ofthe pattern are used in real-time reconstruction of a 3D map of theobject. Further methods for 3D mapping using speckle patterns aredescribed, for example, in PCT International Publication WO 2007/105205,whose disclosure is also incorporated herein by reference.

Other methods of optical 3D mapping project different sorts of patternsonto the object to be mapped. For example, PCT International PublicationWO 2008/120217, whose disclosure is incorporated herein by reference,describes an illumination assembly for 3D mapping that includes a singletransparency containing a fixed pattern of spots. A light sourcetransilluminates the transparency with optical radiation so as toproject the pattern onto an object. An image capture assembly capturesan image of the pattern on the object, and the image is processed so asto reconstruct a 3D map of the object.

SUMMARY

The embodiments of the present invention that are described hereinbelowprovide methods and apparatus for efficient projection of patterns,particularly for 3D mapping, as well as for imaging of such projectedpatterns.

There is therefore provided, in accordance with an embodiment of thepresent invention, apparatus for mapping, which include an illuminationmodule, including a radiation source, which is configured to emit a beamof radiation, and a scanner, which is configured to receive and scan thebeam over a selected angular range. Illumination optics are configuredto project the scanned beam so as to create a pattern of spots extendingover a region of interest. An imaging module is configured to capture animage of the pattern that is projected onto an object in the region ofinterest. A processor is configured to process the image in order toconstruct a three-dimensional (3D) map of the object.

The pattern of the spots may be uncorrelated over a range of depths thatis mapped by the apparatus.

In some embodiments, the radiation source is controlled so as tomodulate an intensity of the beam while the scanner scans the beam,thereby creating the pattern of the spots on the region of interest. Theillumination module may be configured to modify the pattern responsivelyto the image captured by the imaging module. The illumination module maybe configured to control at least one of the radiation source and thescanner so as to modify an angular density of the spots in the arraywithin a selected part of the region of interest. Alternatively oradditionally, the illumination module may be configured to control atleast one of the radiation source and the scanner so as to modify abrightness of the spots in a selected area with the region of interest.

In an alternative embodiment, the scanner is configured to scan the beamover a first angular range, and the optics include a beamsplitter, whichis configured to create multiple, angularly-spaced replicas of thescanned beam, which together extend over a second angular range, whichis greater than the first angular range. The scanner and thebeamsplitter may be configured to tile the region of interest with thepattern created by the multiple, angularly-spaced replicas of thescanned beam.

In another embodiment, the optics include a patterned element, which isconfigured, when illuminated by the beam, to create the pattern over afirst angular range, and the scanner is configured to direct the beam tostrike the patterned element at multiple different angles in successionso as to create multiple, angularly-spaced replicas of the pattern,which together extend over a second angular range, which is greater thanthe first angular range. The scanner and the patterned element may beconfigured to tile the region of interest with the multiple,angularly-spaced replicas of the pattern.

In still another embodiment, the scanner is configured to scan the beamover a first angular range, and the optics include a scan-expandingelement, which is configured to distribute the scanned beam so as tocover a second angular range, greater than the first angular range, withthe spatial pattern. The scan-expanding element may be selected from agroup of elements consisting of a convex reflector and a diffractiveoptical element.

In a disclosed embodiment, the illumination module includes at least onebeam sensor, which is positioned at a selected angle within the angularrange that is scanned by the scanner so as to receive the scanned beamperiodically and verify thereby that the scanner is operating.Typically, the illumination module is configured to inhibit emission ofthe beam from the radiation source when the sensor fails to receive thescanned beam periodically.

In some embodiments, the radiation source includes a first radiationsource, which emits an infrared beam, which is modulated to create thepattern of the spots, and a second radiation source, which emits avisible light beam, which is modulated to project a visible image ontothe region of interest. The scanner and optics are configured to projectboth the infrared beam and the visible light beam onto the region ofinterest simultaneously. Typically, the second radiation source iscontrolled so as to project the visible image onto the objectresponsively to the 3D map.

In disclosed embodiments, the processor is arranged to derive the 3D mapby finding respective offsets between the spots in areas of the capturedimage and corresponding reference spot locations belonging to areference image of the pattern, wherein the respective offsets areindicative of respective distances between the areas and the imagecapture assembly. In some embodiments, the imaging module includes aposition-sensitive detector, which is configured to sense and output anoffset of each spot in the pattern on the object as the spot isprojected by the illumination module. The imaging module may beconfigured to scan a field of view of the position-sensitive detector insynchronization with the scanner in the illumination module or togetherwith the beam from the radiation source.

Alternatively or additionally, the illumination module and the imagingmodule are arranged so that the offsets occur in a first direction, andthe imaging module includes an array of detector elements arranged inone or more rows extending in the first direction, and astigmaticoptics, which are configured to image the pattern onto the array andhave a greater optical power in the first direction than in a second,perpendicular direction.

In some embodiments, the imaging module includes a sensor and imagingoptics, which define a sensing area that is scanned over the region ofinterest in synchronization with the scanned beam of the illuminationmodule. The sensor may include an image sensor having a rolling shutter,wherein the rolling shutter is synchronized with the scanned beam.Additionally or alternatively, the scanner in the illumination modulemay be controllable to dynamically vary the selected angular range, andthe imaging module may include an imaging scanner, which is configuredto dynamically scan the sensing area to match the selected angular rangeof the scanned beam.

There is also provided, in accordance with an embodiment of the presentinvention, apparatus for mapping, which includes an illumination module,including a radiation source, which is configured to emit a beam ofradiation having an intensity that varies according to a specifiedtemporal modulation. A scanner is configured to receive and scan thebeam over a region of interest, so as to project the radiation onto theregion with a spatial intensity pattern determined by the temporalmodulation of the beam. An imaging module is configured to capture animage of the spatial intensity pattern that is projected onto an objectin the region of interest. A processor is configured to process theimage in order to construct a three-dimensional (3D) map of the object.

In a disclosed embodiment, the temporal modulation is binary, andwherein the spatial intensity pattern includes an array of spotsgenerated by the temporal modulation.

In one embodiment, the imaging module includes a sensor and imagingoptics, which define a sensing area that is scanned over the region ofinterest in synchronization with the scanned beam of the illuminationmodule.

There is additionally provided, in accordance with an embodiment of thepresent invention, a method for mapping, which includes scanning a beamof radiation over a selected angular range so as to create a pattern ofspots extending over a region of interest. An image of the pattern thatis projected onto an object in the region of interest is captured andprocessed in order to construct a three-dimensional (3D) map of theobject.

There is further provided, in accordance with an embodiment of thepresent invention, a method for mapping, which includes generating abeam of radiation having an intensity that varies according to aspecified temporal modulation. The beam is scanned over a region ofinterest, so as to project the radiation onto the region with a spatialintensity pattern determined by the temporal modulation of the beam. Animage of the spatial intensity pattern that is projected onto an objectin the region of interest is captured and processed in order toconstruct a three-dimensional (3D) map of the object.

The present invention will be more fully understood from the followingdetailed description of the embodiments thereof, taken together with thedrawings in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic top view of a system for 3D mapping, in accordancewith an embodiment of the present invention;

FIGS. 2A and 2B are schematic top views of an illumination module in twodifferent phases of operation, in accordance with an embodiment of thepresent invention;

FIG. 2C is a schematic frontal view of a pattern projected by the moduleof FIGS. 2A and 2B, in accordance with an embodiment of the presentinvention;

FIGS. 3-5 are schematic top views of illumination modules, in accordancewith other embodiments of the present invention;

FIG. 6 is a schematic, pictorial view of a 3D mapping system inoperation, in accordance with an embodiment of the present invention;

FIG. 7 is a schematic top view of an illumination module, in accordancewith yet another embodiment of the present invention;

FIGS. 8 and 9 are schematic, pictorial views of imaging modules, inaccordance with embodiments of the present invention; and

FIG. 10 is a schematic, pictorial view of a 3D mapping device, inaccordance with an embodiment of the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS

The embodiments of the present invention that are described hereinbelowprovide, inter alia, methods and apparatus for efficient projection ofpatterns, particularly for 3D mapping, as well as for efficient imagingof such projected patterns.

In some embodiments of the present invention, an illumination moduleprojects a pattern of spots onto a region of interest, and an imagingmodule captures an image of the pattern appearing on objects in theregion. This image is processed in order to find the locations of thespots in the image and, on this basis, to construct a 3D map of anobject in the region of interest. The depth coordinates in the map arecomputed by triangulation, typically based on the offsets of the spotsin the image relative to corresponding reference spot locations in areference image of the pattern.

In the disclosed embodiments, the pattern is projected dynamically,i.e., it is not projected all at once over the entire region, but israther created by scanning a beam emitted by a radiation source. Thebeam is scanned over a selected angular range. (Some of the disclosedembodiments are directed to controlling and/or expanding this range.)The intensity of the beam is typically modulated during the scan inorder to create the desired pattern. The scan is “dynamic” in the sensethat aspects of the pattern, such as its density, brightness, and/orangular range, may be modified in the course of mapping a given scene.Although the embodiments described hereinbelow are drawn specifically tospot patterns, the principles of the present invention may similarly beapplied in creating patterns of other sorts for purposes of 3D mapping.

This dynamic scanning approach is advantageous in a number of importantrespects. For example, dynamic scanning in this manner affordsflexibility in creation of the pattern, particularly in that the patterncan be modified on the basis of the image of the region of interest. Forexample, the angular density of the spots in the pattern and/or thebrightness of the spots can be varied in different areas, depending onscene conditions and features of objects of interest in the scene.

The imaging module can likewise be operated dynamically in conjunctionwith the scan of the illuminating beam, so that the active field of viewof the imaging module tracks the area of the pattern that is actuallyilluminated at any point in the scan. The image thus created of theregion of interest is not necessarily captured all at once, as inconventional image sensors, but may be assembled electronically based onlocal signals captured by a detector during the scan, as a part of theprocess of creating the 3D map. Concentrating the illumination anddetection resources in a small, moving area in this way can enhance thesignal/background ratio of the detected pattern and hence improve theaccuracy of 3D mapping. The field of view of the imaging module cantrack the scan of the illuminating beam optically, possibly using (atleast in part) the same scanner as the illumination module, orelectronically, using an image sensor with a rolling shutter, forexample.

Some of the embodiments described below are directed to expanding theangular range of the scan provided by the illumination module. Theseembodiments address the need of some 3D mapping systems for a wide fieldof view, which is much larger than the scan range of some conventionalscanners. In one such embodiment, the optics of the projection modulecomprise a beamsplitter, which simultaneously creates multiple,angularly-spaced replicas of the scanned beam. These replicas togetherextend over a larger angular range than the scan range. In anotherembodiment, the scanner directs the beam from the radiation source tostrike a patterned element at multiple different angles in succession,and thus to create multiple, angularly-spaced replicas of the pattern.In either case, the elements of the illumination module may beconfigured to tile the region of interest with the pattern in thismanner, i.e., to cover the region with adjacent replicas of the pattern,without significant overlap or gaps between the replicas. (In thiscontext, gaps or overlaps are considered “significant” if they are onthe order of the spacing between the spots or larger than this order.)

Alternatively or additionally, the illumination module may comprise ascan-expanding element, such as a convex reflector or a diffractiveoptical element (DOE), which expands the angular range covered by thescanned beam.

Other applications of and variations on the elements of a 3D mappingsystem using a scanned radiation source are described hereinbelow.

System Description

FIG. 1 is a schematic top view of system 20 for 3D mapping, inaccordance with an embodiment of the present invention. System 20 isbuilt around a mapping device 22, which is configured to capture imagesand generate 3D maps of a scene. The scene here includes an object 28,such as the hand of a user of the device. The depth information in the3D maps generated by device 22 may be used, for example, by a hostcomputer (not shown) as part of a 3D user interface, which enables theuser to interact with games and other applications running on thecomputer and with elements shown on a display screen. (This sort offunctionality is described, for instance, in U.S. Patent ApplicationPublication 2009/0183125, whose disclosure is incorporated herein byreference.) This particular application of device 22 is mentioned hereonly by way of example, however, and the mapping capabilities of thedevice may be used for other purposes, as well, and applied tosubstantially any suitable types of scenes and 3D objects.

In the example shown in FIG. 1, an illumination module 30 in mappingdevice 22 projects a pattern of optical radiation onto object 28, aswill be explained in detail hereinbelow. The optical radiation that isused for this purpose is typically in the infrared (IR) range, butvisible or ultraviolet light may similarly be used. (In one embodiment,which is shown in FIG. 7, an illumination module projects both IR andvisible radiation.) An imaging module 38 captures and decodes images ofthe pattern on the object in order to generate a digital shift value foreach pixel in the image. The shift value represents the offset betweenan element of the pattern (typically a spot) in the area of each pixelin the captured image and a reference location of the correspondingpattern element in a reference image of the pattern. These offsets areindicative of respective distances between the point in the actual scenecorresponding to the pixel and the image capture assembly.Alternatively, module 38 may output raw pixel values, and the shiftvalues may be computed by another component of device 22 or by the hostcomputer.

A processor 46 in device 22 processes the shift values (after computingthe shift values from the raw pixel values output by module 38 ifnecessary) in order to generate a depth map of the region of interestthat is illuminated and imaged by device 22. The depth map comprises anarray of 3D coordinates, comprising a depth (Z) coordinate value of theobject surface at each

oint (X,Y) within a predefined field of view. (In the context of anarray of image-related data,

hese (X,Y) points are also referred to as pixels.) In the presentembodiment, the processor computes the 3D coordinates of points on thesurface of the object 28 by triangulation, based on

e transverse shift of the pattern at each pixel. The principles of suchtriangulation computations are described, for example, in theabove-mentioned PCT publications WO 007/043036, WO 2007/105205 and WO2008/120217.

In alternative embodiments, elements of device 22 may be used, mutatismutandis, in other types of depth mapping systems, such as systems thatare based on measurement of the

ime of flight of light pulses to and from the scene of interest orstereoscopic systems, as well as

n other sorts of applications that use projected beams.

In FIG. 1, the X-axis is taken to be the horizontal direction along thefront of device 22, the Y-axis is the vertical direction (out of thepage in this view), and the Z-axis extends away from device 22 in thegeneral direction of the object being imaged by the assembly. Theoptical

xes of modules 30 and 38 are parallel to the Z-axis, with respectivepupils on the X-axis at a

nown distance apart. In this configuration, the transverse shift of thepattern in the images captured by module 38 will be exclusively (towithin tolerance errors) in the X-direction, as explained in theabove-mentioned PCT publications.

As noted above, illumination module 30 illuminates the scene of interestwith a pattern of spots, such as an uncorrelated pattern of spots. Inthe context of the present patent application and in the claims, theterm “uncorrelated pattern” refers to a projected pattern of

pots (which may be bright or dark), whose positions are uncorrelated inplanes transverse to the projection beam axis. The positions areuncorrelated in the sense that the auto-correlation of the pattern as afunction of transverse shift is insignificant for any shift that islarger than the

pot size and no greater than the maximum shift that may occur over therange of depths

napped by the system. Random, pseudo-random and quasi-periodic patternsare typically

ncorrelated to the extent specified by the above definition.

To generate the pattern of spots, module 30 typically comprises asuitable radiation source 32, such as a collimated diode laser or alight-emitting diode (LED) or other light source with a radiation beamof appropriate shape. The beam is scanned over a range of angles by asuitable scanner 34 and illumination optics 35. The beam is modulatedduring the scan in order

o generate the pattern. For example, the beam may be temporallymodulated by turning source 2 on and off to create a binary pattern ofspots or other forms. Optics 35 typically comprise one or more lensesand/or other optical components, which may take various different formsin different embodiments, as described below. The pattern is projectedonto the scene over a certain angular range, which defines a projectionfield of view (FOV) 36, thus converting the

emporal modulation of source 32 into a desired spatial intensity patternextending over objects

n the region of interest of system 20.

In the disclosed embodiments, scanner 34 comprises a scanning mirror 50with a mechanical scan drive, although other types of scanners (such asacousto-optical scanners) may alternatively be used. Scanner 34 maycomprise, for example, a bi-directional scanning mirror

r a pair of uni-directional scanning mirrors. Such mirrors may be basedon integrated micro-lectromechanical systems (MEMS) technology. Scanningmirrors of this sort are produced by number of manufacturers, such asMicrovision, Inc. (Redmond, Wash.).

Imaging module 38 typically comprises objective optics 42, which form animage on a sensor 40 of the projected pattern appearing on the scene inthe region of interest. In the example pictured in FIG. 1, sensor 40comprises a CMOS image sensor, comprising a two-imensional matrix ofdetector elements 41. The rows and columns of the matrix are alignedwith the X and Y axes. Alternatively, other types of sensors may be usedin module 38, as described below. Sensor 40 and objective optics 42define an imaging field of view 44, which typically contained within FOV36 in the region of interest of device 22. Although sensor 40 shown inFIG. 1 as having roughly equal numbers of rows and columns of detectorelements 1, in other embodiments, which are described hereinbelow, thesensor may comprise only a small number of rows, or even only a singlerow or a single position-sensitive detector element.

As noted above, radiation source 32 typically emits IR radiation. Sensor40 may comprise a monochrome sensor, without an IR-cutoff filter, inorder to detect the image of the projected pattern with highsensitivity. To enhance the contrast of the image captured by sensor 40,optics 42 or the sensor itself may comprise a bandpass filter (notshown), which passes the wavelength of radiation source 32 whileblocking ambient radiation in other bands.

Processor 46 typically comprises an embedded microprocessor, which isprogrammed in software (or firmware) to carry out the processing andcontrol functions that are described herein. The processor may, forexample, dynamically control illumination module 30 and/or imagingmodule 38 to adjust parameters such as the pattern density, brightness,and angular

xtent, as described in detail hereinbelow. A memory 48 may hold programcode, lookup

ables, and/or interim computational results. Alternatively oradditionally, processor 46 may comprise programmable hardware logiccircuits for carrying out some or all of its functions. Details of theimplementation of a depth mapping processor, which may be applied toprocessor 16, are provided in U.S. Patent Application Publication2010/0007717, whose disclosure is incorporated herein by reference.

Scanning Illumination Modules

FIGS. 2A and 2B are schematic top views of illumination module 30 in twodifferent phases of operation, in accordance with an embodiment of thepresent invention. In this embodiment, radiation source 32 comprises alaser diode 52 and a collimating lens 54. The

eam from the radiation source is scanned by scanning mirror 50 over arange of angles, which

s limited by the mechanical and optical properties of the scanner. (Thescanning mechanism is)

mitted from this and subsequent figures for the sake of simplicity.)FIG. 2A shows the mirror it roughly the center of the scan, while inFIG. 2B the mirror is at its most extreme deflection. This deflectiondefines the maximal angular range that can be covered by the scannedbeam.

To expand this range, a beamsplitter 55, such as a suitable diffractiveoptical element DOE), splits the scanned beam to create multiple,angularly-spaced replicas 56, 58, 60 of the scanned beam. (In theabsence of the beamsplitter, module 30 would project only beam 56.) Asmirror 50 scans the radiation beam, replicas 56, 58, 60 sweep inparallel over the region of interest, covering an angular range that isgreater than the scan range provided by the scanner done. Although forthe sake of simplicity, FIGS. 2A and 2B show three replica beams,beamsplitter 55 may alternatively be configured to give only two replicabeams or to give a larger number of replica beams. In general,beamsplitter 55 can be configured to generate substantially any array ofmXn beam replicas, in substantially any desired layout, depending on theapplication requirements.

FIG. 2C is a schematic frontal view of the radiation pattern projectedby the illumination nodule of FIGS. 2A and 2B, in accordance with anembodiment of the present invention. On/off modulation of laser diode 52causes each beam replica 56, 58, 60, . . . , to create a

espective pattern 64 of spots 66 within a corresponding sub-area offield of view 36. The fan-out angle of beamsplitter 55 and the angularscanning range of scanner 34 are typically chosen

o that patterns 64 tile the region of interest, with substantially noholes and no overlap between the patterns. This sort of tilingarrangement can be used efficiently to project patterns over a

vide angular range in 3D mapping systems. Alternatively, the fan-outangle and scanning range may be chosen so that patterns 64 overlap. Thepatterns may be spot patterns, as in the pictured embodiment, or maycomprise other types of structured light.

FIG. 3 is a schematic side view of illumination module 30, in accordancewith an alternative embodiment of the present invention. This embodimentmay be used to create the

ame sort of tiled pattern that is shown in FIG. 2C. It differs from theother embodiments described here, however, in that it uses a diffractiveoptical element (DOE) 70 as a spatial

odulator to create the patterned illumination of the scene, inconjunction with scanning mirror

0. As a result of this arrangement, the demands on mirror 50 arereduced, so that a much lower scan rate is possible, or mirror 50 maysimply jump between discrete positions, and llumination source 32 can bepulsed on and off at a much slower rate.

In terms of optical principles, this embodiment is similar to DOE-basedschemes that are described in U.S. Patent Application Publications2009/0185274 and 2010/0284082, both of which are incorporated herein byreference. These publications describe methods for creating

iffraction patterns using a pair of DOEs, one of which splits an inputbeam into a matrix of output beams, while the other applies a pattern toeach of the output beams. The two DOEs together thus project radiationonto a region in space in multiple adjacent instances of the pattern.

In the present embodiment, the scan pattern of mirror 50 takes the placeof one of the

OEs in splitting the input beam from radiation source 32 into multipleintermediate beams 72. or this purpose, mirror 50 scans in the X- andY-directions to each of a matrix of predetermined angles and dwells ateach of these angles for a certain period of time, typically

n the order of a few milliseconds. Each dwell point defines a beam 72.DOE 70 diffracts each of beams 72 into a patterned output beam 74, alonga respective axis 76. The fan-out angle between axes 76 and thedivergence angle of beams 74 may be chosen (by appropriate design of

OE 70 and of the scan pattern of mirror 50) so that beams 74 tile fieldof view 36, in the

anner shown in FIG. 2C.

The embodiment of FIG. 3 may operate in conjunction with various typesof image capture modules 38, as described below. Because beams 74 areilluminated in sequence, it is

esirable that the image capture pattern of module 38 be synchronizedwith the illumination sequence in order to maximize thesignal/background ratio in the captured images of the scene

f interest. Certain types of image sensors, such as CMOS sensors, have arolling shutter, which may be synchronized with the illuminationsequence using techniques that are described, or example, in U.S. patentapplication Ser. No. 12/762,373, filed Apr. 19, 2010, whose disclosureis incorporated herein by reference.

FIG. 4 is a schematic side view of illumination module 30, in accordancewith another embodiment of the present invention. Assuming source 32 tobe a laser, the beam it emits is

ntense and should be scanned continuously by mirror 50 to ensure eyesafety. In normal

peration of module 30, source 32 emits the beam only while mirror 50 ismoving, so that the well time at all locations in field of view 36 isshort and therefore does not pose any danger to one eye. If themechanism that drives mirror 50 sticks or otherwise malfunctions,however, the beam may dwell at one location for an extended period.

To avoid this eventuality, module 30 comprises one or more beam sensors80, 82, . . . , such as photodiodes, which are coupled to processor 46(not shown in this figure). These sensors are positioned at a selectedangle or angles within the angular range that is scanned by mirror so asto receive the scanned beam periodically and thus verify that thescanner is operating. In this example, two sensors are shown on oppositesides of FOV 36, but a single safety sensor or a larger number of suchsensors may alternatively be used.

The mechanism that drives mirror 50 may be programmed, for example, todirect the beam from source 32 toward sensor 80 at the beginning of eachscan and toward sensor 82 at the end of each scan. When the beam strikesone of the sensors, that sensor outputs a pulse to processor 46. Theprocessor monitors the pulses and tracks the time elapsed from pulse topulse. If the time exceeds a preset maximum, the processor willimmediately inhibit emission of the beam from radiation source 32(typically by simply shutting it off). This sort of timing

vent will occur if mirror 50 gets stuck at a given location. Thus, insuch a case, the beam from module 30 will be immediately shut off, andany potential safety hazard will be averted.

FIG. 5 is a schematic side view of projection module 30, in accordancewith yet another embodiment of the present invention. This embodiment isdirected particularly toward xpanding FOV 36 relative to the scanningrange of mirror 50. It addresses the problem that in certaintechnologies, such as MEMS, the scanning range of mirror 50 is small,while some 3D mapping applications call for mapping over a wide field.

In the pictured embodiment, mirror 50 scans over an angular range equalto α_(mirror)/2,

iving an initial FOV of width α_(mirror), typically on the order of10-30°. The beam from mirror 50 strikes a scan-expanding element—in thiscase a convex reflector 88—which expands the) beam range so that FOV 36has width α_(out), which may be on the order of 60-120°. Fortwo-imensional (X-Y) scanning, element 60 may be spherical, or it mayhave a surface with different radii of curvature in the X and Ydirections in order to generate a field of view that is wider in onedimension than the other, or it may have some other aspheric shape.Alternatively, the scan-expanding reflector may be replaced by a DOE ora refractive element (not shown) with similar scan-expanding properties.Further alternatively, the function of reflector 88 may) e fulfilled bya combination of optical elements of the same or different types.

FIG. 6 is a schematic, pictorial view of a 3D mapping system 90 inoperation, in accordance with an embodiment of the present invention. Inthis system, device 22 is used in conjunction with a game console 92 tooperate an interactive game, with two participants 94 and 96. For thispurpose, device 22 projects a pattern of spots 100 onto objects in itsfield of

iew, including the participants and a background 98, such as the wall(and other elements) of the room in which system 90 is located. Device22 captures and processes an image of the) pattern, as explained above,in order to create a 3D map of the participants and other objects in thescene. Console 92 controls the game in response to the participants'body movements, which are detected by device 22 or console 92 bysegmenting and analyzing changes in the 3D map.

System 90 is shown here in order to exemplify some of the difficultiesthat may be encountered by 3D mapping systems. Objects in the mappedscene may vary greatly in size, and frequently small objects (such asthe participants' hands, legs and heads) move and change their apparentform quickly. Furthermore, it is often just these objects that need tobe mapped accurately for purposes of the game running on console 92 andother interactive applications. At the same time, different objects inthe region of interest may reflect the patterned llumination back todevice 22 with widely-varying intensity, due both to variations inreflectance and to large differences in distance from the device. As aresult, some areas of the pattern in the images captured by imagingmodule 38 may be too dim to give accurate depth

eadings.

To overcome these problems, illumination module 30 in device 22,projects the pattern adaptively, changing the density and/or brightnessof the pattern in response to the geometry of the scene. The informationabout scene geometry is provided by the images captured by imagingmodule 38 and/or by the 3D maps that are generated by processing theseimages. Thus, radiation source 32 and scanner 34 are controlleddynamically, during operation of system 90, to project spots 100 withgreater density on objects of importance that are either small orrapidly varying, or otherwise require closer attention or better depthcoverage, such as the bodies of participants 94 and 96. On the otherhand, large smooth objects, such as background 98, are covered with asparser pattern. Device 22 may adjust the pattern density adaptively insuccessive images, in response to changes in the scene.

Additionally or alternatively, device 22 may adjust the output power ofradiation source 32 dynamically, in order to compensate for variationsin distance and reflectivity within the captured scene. Thus,illumination module may project spots with greater brightness towardobjects that have low reflectivity or are far from device 22, such asbackground 98, while reducing the projected power on bright, nearbyobjects. Alternatively or additionally, the local scanning speed of themirror, and thus the dwell time at each location in the scan range, maybe controlled to give longer local dwell time, and hence greater localprojected energy, in areas requiring greater illumination. These sortsof adaptive power control enhance the dynamic range of system 90 andoptimizes the use of available radiation power.

As a further aspect of the dynamic operation of system 90 (notillustrated in FIG. 6), the angular ranges of the illumination andimaging modules in device 22 may also be adjusted dynamically. Forexample, after first capturing a wide-angle image and creating awide-angle, low-resolution 3D map of the region of interest, device 22may be controlled to zoom in on particular objects that have beenidentified within the region. Thus, the angular scan range of theprojected pattern and sensing range of the imaging module may be reducedto provide higher-resolution depth maps of the bodies of participants 94and 96. As the participants move within the scene, the scan and sensingranges may be adjusted accordingly.

FIG. 7 is a schematic side view of an illumination module 110, inaccordance with still another embodiment of the present invention.Module 110 may be used in place of module 30

n device 22 (FIG. 1), and offers added capabilities in using the samescanning hardware to simultaneously project both the IR pattern (for 3Dmapping) and visible content that can be viewed by a user of the device.

In this sort of embodiment, device 22 may create a 3D map of a givenobject using the

R pattern, and may then project onto the object a visible image that istailored to the shape and contours of the object. This sort ofcapability is useful, for example, in presenting user interface graphicsand text, and particularly in “augmented reality” applications (forwhich device 22 may even be integrated into goggles worn by the user sothat mapping and visible image projection are aligned with the user'sfield of view). Applications of this sort are described, for example, inPCT Patent Application PCT/IB2011/053192, filed Jul. 18, 2011, vhosedisclosure is incorporated herein by reference.

As shown in FIG. 7, a beam combiner 114, such as a dichroic reflector,aligns the IR beam from radiation source 32 with a visible beam from avisible light source 112. Source 112 may be monochromatic orpolychromatic. For example, source 112 may comprise a suitable laserdiode or LED for monochromatic illumination, or it may comprise multiplelaser diodes or LEDs of different colors (not shown), whose beams aremodulated and combined in order to project the desired color at eachpoint in the field of view. For this latter purpose, combiner 114 maycomprise two or more dichroic elements (not shown) in order to align allof the different colored and IR beams.

As mirror 50 scans over FOV 36, processor 46 modulates sources 32 and 72simultaneously: Source 32 is modulated to generate the desired patternfor 3D mapping at each point in the field, while source 112 is modulatedaccording to the pixel value (intensity and possibly color) of thevisible image that is to be projected at the same point (which may be

ased on the 3D map of the object at that point). Because the visible andIR beams are optically aligned and coaxial, the visible image will beautomatically registered with the 3D map.

Image Capture Configurations

FIG. 8 is a schematic pictorial view of imaging module 38, in accordancewith an embodiment of the present invention. This embodiment takesadvantage of synchronization between the scan pattern of illuminationmodule 30 and the readout pattern of the imaging module. Thissynchronization makes it possible to use an image sensor 120 with arelatively small number of rows 122 of detector elements 41 relative tothe number of columns. In other words, the image sensor itself has lowresolution in the Y-direction (the vertical direction in the figure),but high resolution in the X-direction. In the pictured embodiment,image sensor 80 as less than ten rows and may have, for example, onethousand or more columns. Alternatively, the image sensor may havelarger or smaller numbers of rows, but still far fewer rows thancolumns.

Objective optics 42 comprise an astigmatic imaging element, which mapsfield of view 44 onto image sensor 120. Optics 42 have largermagnification in the Y-direction than in the X-direction, so that eachrow 122 of the image sensor captures light from a correspondingrectangular area 124 in the field of view. For example, the aspect ratioof each rectangular area 124 may be on the order of 10:1 (X:Y), whilerows 122 have an aspect ratio on the order of 1000:1. The different X-and Y-magnifications of optics 42 may be chosen in any desired ratio,depending on the number of rows and columns in the image sensor and thedesired dimensions of the field of view. In one embodiment, for example,optics 42 may comprise a cylindrical lens, and sensor 120 may compriseonly a single row of detector elements.

Illumination module 30 scans the beam from radiation source 32 overfield of view 44 in a raster pattern, covering each of areas 124 withmultiple horizontal scan lines. As each line in a given area 124 isscanned by the spot from the illumination module, the corresponding row122 captures the radiation reflected from the scene. Readout from sensor120 is synchronized with the illumination scan, so that the rows 122 ofdetector elements 41 are read out substantially only when thecorresponding areas 124 in the scene are illuminated by the scan. As aresult, the length of time during which each row 122 integrates ambientlight for each readout is reduced, and the signal/ambient ratio in theoutput of sensor 120 is thus enhanced.

The resolution of the images captured by module 38 in this embodiment isgoverned by the resolution of the illumination scan, as each row 122 ofsensor 120 is read out multiple times in synchronization with the scan.In other words, the first row is scanned multiple times whileillumination module scans the corresponding area 124, followed bymultiple scans of the second line, then the third line, etc. Forexample, if the first row in the image sensor is responsible forcapturing the first hundred scan lines of the illumination module ( 1/10of the vertical FOV), then it is scanned one hundred times before thesecond line is scanned. For this purpose, sensor 120 includes suitablereadout circuits (not shown), similar to the readout circuits in aconventional, full-resolution CMOS image sensor, for example.Alternatively, a vertical fan-out element may be used on theillumination side, and the lines of the image sensor may scansimultaneously, each synchronized with the corresponding illuminationscan.

Alternatively, the scanning of image sensor 120 may be verticallymultiplexed in synchronization with the illumination scan. In thisscheme, for example, using an imaging sensor with one hundred rows, thefirst row of the image sensor captures, for example, the first,101^(st), 201^(st), 301^(st) scan line, etc., of the illumination scan.Additionally or alternatively, imaging module 38 may implement the sortof spatially-multiplexed imaging schemes that are described, forexample, in U.S. Provisional Patent Application 61/419,891, filed Dec.6, 2010, whose disclosure is incorporated herein by reference. Acombination of the above scanning techniques can also be used.

The arrangement of image capture module 38 that is shown in FIG. 8maintains full resolution in the X-direction, while relying on thesynchronized scan of illumination module 30 to provide Y-directionresolution. This embodiment thus allows image sensor 120 to be madesmaller and less costly, with simpler readout circuits, whilepotentially affording increased resolution in the X-direction. ThisX-resolution is useful, since in the configuration shown in FIG. 1, onlythe X-direction shift of the pattern in images captured by module 38 isindicative of depth variations within the scene, as explained above. Thehigh resolution in the X-direction thus provides accurate readings ofspot offset, which in turn enable accurate computation of depthcoordinates.

FIG. 9 is a schematic pictorial view of imaging module 38, in accordancewith another embodiment of the present invention. This embodiment alsotakes advantage of synchronization between the scan pattern ofillumination module 30 and the readout pattern of the imaging module. Inthis case, however, field of view 44 of imaging module 38 is activelyscanned.

In the embodiment of FIG. 9, image capture module 38 comprises aposition-sensitive detector 130, which is configured to sense and outputan X-offset of each spot in the pattern that is projected onto on theobject by illumination module 30. In other words, as module 30 projectseach spot in turn onto the corresponding location in the region ofinterest, detector 130 senses its image and indicates its respectiveoffset from the corresponding reference spot location (and thus thedepth coordinate in the scene at that location). Detector 130 is shownin the figure as a line-scan sensor 90 with a single row of detectorelements 41 extending in the X-direction. Alternatively,position-sensitive detector 130 may comprise a unitary detector elementwith an analog readout indicating the location of the spot that iscurrently imaged onto the detector.

In the pictured embodiment, objective optics 42 map a rectangular area134 in field of view 44 onto the row of detector elements 41 in sensor130. Optics 42 may, as in the preceding embodiment, be astigmatic, withgreater optical power in the X-direction than in the Y-direction, sothat area 134 has a lower aspect ratio (X:Y) than the row of detectorelements in the sensor. A scanning mirror 132 scans area 134 over fieldof view 44 in the Y-direction, in synchronization with the raster scanof illumination module 30, so that area 134 always contains thehorizontal line that is currently under patterned illumination. In thismanner, the image capture module captures an image of the pattern on thescene with high resolution and high signal/ambient ratio, while using asimple one-dimensional sensor.

FIG. 10 is a schematic, pictorial view of a 3D mapping device 140, inaccordance with still another embodiment of the present invention. Inthis embodiment, the fields of view of an illumination module 142 and animaging module 144 are jointly scanned in the Y-direction by a commonmirror 150. Illumination module 142 comprises radiation source 32 and abeam scanner, in the form of a scanning mirror 152, which scans theradiation beam in the X-direction. Imaging module 144 comprises adetector 154, whose field of view is scanned in the X-direction by animaging scanner comprising a scanning mirror 156, in synchronizationwith scanning mirror 152. Projection optics 146 project the illuminationbeam onto the region of interest of device 140 in order to create thedesired pattern of spots on objects in the scene, and objective optics148 image the spots onto detector 154.

The sensing area of imaging module 144 is thus scanned over the regionof interest in synchronization with the scanned beam of illuminationmodule 142. Detector 154 may comprise, for example, a position-sensitivedetector as in the embodiment of FIG. 9 or a small-area image sensor,with detector elements arranged in rows and columns. As in the precedingembodiments, imaging module 144 provides measurements of spot offset,which may then be processed to generate a depth map. Although mirror 150in FIG. 10 is conveniently shared by both the illumination and imagingmodules, each module may alternatively have its own, synchronizedY-direction scanning mirror. In this latter case, all the mirrors indevice 140 could be produced using MEMS technology. As the Y-directionscan is relatively slow, however, the single mirror 150 with a steppeddrive is feasible for this application and is advantageous inmaintaining precise synchronization.

The arrangement shown in FIG. 10 can be used to implement dynamiccontrol not only of the spot density and brightness in the projectedpattern, but also of the scan area, as explained above. Mirrors 150 and152 may be operated to vary the angular range over which theillumination beam is scanned, and mirrors 150 and 156 will then scan thesensing area of detector 154 to match the angular range of the scannedbeam. In this way, for example, device 140 may first be operated tocapture a coarse 3D map of an entire scene, covering a wide angularrange. The 3D map may be segmented in order to identify an object ofinterest, and the scan ranges of the illumination and imaging assembliesmay then be dynamically adjusted to capture and map only the area of theobject with high resolution. Other applications of this sort of dynamiccontrol will be apparent to those skilled in the art and are consideredto be within the scope of the present invention.

A number of specific ways to enhance scanning architectures for patternprojection and image capture have been shown and described above. Theseembodiments illustrate, by way of example, how aspects of the presentinvention can be used, inter alia, to improve eye safety, to increasefield of view, to simultaneously use the same scanning hardware toproject both IR patterns and visible content, and to reduce the size ofthe imaging module by synchronizing it with the illumination module.Alternative implementations and combinations of the above embodimentsare also considered to be within the scope of the present invention.Such schemes may use various combinations of scanning projection for 3Dmapping, as well as projection of visible information; diffractiveoptics to shape or split the scanning beam; refractive and/ordiffractive optics to enlarge the field of view of the projectionsystem; and synchronized scanning of projection and image capture.

It will thus be appreciated that the embodiments described above arecited by way of example, and that the present invention is not limitedto what has been particularly shown and described hereinabove. Rather,the scope of the present invention includes both combinations andsubcombinations of the various features described hereinabove, as wellas variations and modifications thereof which would occur to personsskilled in the art upon reading the foregoing description and which arenot disclosed in the prior art.

1. Apparatus for mapping, comprising: an illumination module,comprising: a radiation source, which is configured to emit a beam ofradiation; a scanner, which is configured to receive and scan the beamover a selected angular range; and illumination optics, which areconfigured to project the scanned beam so as to create a pattern ofspots extending over a region of interest; an imaging module, which isconfigured to capture an image of the pattern that is projected onto anobject in the region of interest; and a processor, which is configuredto process the image in order to construct a three-dimensional (3D) mapof the object.
 2. The apparatus according to claim 1, wherein thepattern of the spots is uncorrelated over a range of depths that ismapped by the apparatus.
 3. The apparatus according to claim 1, whereinthe radiation source is controlled so as to modulate an intensity of thebeam while the scanner scans the beam, thereby creating the pattern ofthe spots on the region of interest.
 4. The apparatus according to claim3, wherein the illumination module is configured to modify the patternresponsively to the image captured by the imaging module.
 5. Theapparatus according to claim 4, wherein the illumination module isconfigured to control at least one of the radiation source and thescanner so as to modify an angular density of the spots in the arraywithin a selected part of the region of interest.
 6. The apparatusaccording to claim 4, wherein the illumination module is configured tocontrol at least one of the radiation source and the scanner so as tomodify a brightness of the spots in a selected area with the region ofinterest.
 7. The apparatus according to claim 3, wherein the scanner isconfigured to scan the beam over a first angular range, and wherein theoptics comprise a beamsplitter, which is configured to create multiple,angularly-spaced replicas of the scanned beam, which together extendover a second angular range, which is greater than the first angularrange.
 8. The apparatus according to claim 7, wherein the scanner andthe beamsplitter are configured to tile the region of interest with thepattern created by the multiple, angularly-spaced replicas of thescanned beam.
 9. The apparatus according to claim 1, wherein the opticscomprise a patterned element, which is configured, when illuminated bythe beam, to create the pattern over a first angular range, and whereinthe scanner is configured to direct the beam to strike the patternedelement at multiple different angles in succession so as to createmultiple, angularly-spaced replicas of the pattern, which togetherextend over a second angular range, which is greater than the firstangular range.
 10. The apparatus according to claim 9, wherein thescanner and the patterned element are configured to tile the region ofinterest with the multiple, angularly-spaced replicas of the pattern.11. The apparatus according to claim 1, wherein the scanner isconfigured to scan the beam over a first angular range, and wherein theoptics comprise a scan-expanding element, which is configured todistribute the scanned beam so as to cover a second angular range,greater than the first angular range, with the spatial pattern.
 12. Theapparatus according to claim 11, wherein the scan-expanding element isselected from a group of elements consisting of a convex reflector and adiffractive optical element.
 13. The apparatus according to claim 1,wherein the illumination module comprises at least one beam sensor,which is positioned at a selected angle within the angular range that isscanned by the scanner so as to receive the scanned beam periodicallyand verify thereby that the scanner is operating.
 14. The apparatusaccording to claim 13, wherein the illumination module is configured toinhibit emission of the beam from the radiation source when the sensorfails to receive the scanned beam periodically.
 15. The apparatusaccording to claim 1, wherein the radiation source comprises: a firstradiation source, which emits an infrared beam, which is modulated tocreate the pattern of the spots; and a second radiation source, whichemits a visible light beam, which is modulated to project a visibleimage onto the region of interest, wherein the scanner and optics areconfigured to project both the infrared beam and the visible light beamonto the region of interest simultaneously.
 16. The apparatus accordingto claim 15, wherein the second radiation source is controlled so as toproject the visible image onto the object responsively to the 3D map.17. The apparatus according to claim 1, wherein the processor isarranged to derive the 3D map by finding respective offsets between thespots in areas of the captured image and corresponding reference spotlocations belonging to a reference image of the pattern, wherein therespective offsets are indicative of respective distances between theareas and the image capture assembly.
 18. The apparatus according toclaim 17, wherein the imaging module comprises a position-sensitivedetector, which is configured to sense and output an offset of each spotin the pattern on the object as the spot is projected by theillumination module.
 19. The apparatus according to claim 18, whereinthe imaging module is configured to scan a field of view of theposition-sensitive detector in synchronization with the scanner in theillumination module.
 20. The apparatus according to claim 18, whereinthe scanner is configured to scan a field of view of theposition-sensitive detector together with the beam from the radiationsource.
 21. The apparatus according to claim 17, wherein theillumination module and the imaging module are arranged so that theoffsets occur in a first direction, and wherein the imaging modulecomprises: an array of detector elements arranged in one or more rowsextending in the first direction; and astigmatic optics, which areconfigured to image the pattern onto the array and have a greateroptical power in the first direction than in a second, perpendiculardirection.
 22. The apparatus according to claim 1, wherein the imagingmodule comprises a sensor and imaging optics, which define a sensingarea that is scanned over the region of interest in synchronization withthe scanned beam of the illumination module.
 23. The apparatus accordingto claim 22, wherein the sensor comprises an image sensor having arolling shutter, and wherein the rolling shutter is synchronized withthe scanned beam.
 24. The apparatus according to claim 22, wherein thescanner in the illumination module is controllable to dynamically varythe selected angular range, and wherein the imaging module comprises animaging scanner, which is configured to dynamically scan the sensingarea to match the selected angular range of the scanned beam. 25.Apparatus for mapping, comprising: an illumination module, comprising: aradiation source, which is configured to emit a beam of radiation havingan intensity that varies according to a specified temporal modulation;and a scanner, which is configured to receive and scan the beam over aregion of interest, so as to project the radiation onto the region witha spatial intensity pattern determined by the temporal modulation of thebeam; an imaging module, which is configured to capture an image of thespatial intensity pattern that is projected onto an object in the regionof interest; and a processor, which is configured to process the imagein order to construct a three-dimensional (3D) map of the object. 26.The apparatus according to claim 25, wherein the temporal modulation isbinary, and wherein the spatial intensity pattern comprises an array ofspots generated by the temporal modulation.
 27. The apparatus accordingto claim 25, wherein the processor is arranged to derive the 3D map byfinding respective offsets between the pattern in areas of the capturedimage and a reference image of the pattern, wherein the respectiveoffsets are indicative of respective distances between the areas and theimage capture assembly.
 28. The apparatus according to claim 25, whereinthe imaging module comprises a sensor and imaging optics, which define asensing area that is scanned over the region of interest insynchronization with the scanned beam of the illumination module.
 29. Amethod for mapping, comprising: scanning a beam of radiation over aselected angular range so as to create a pattern of spots extending overa region of interest; capturing an image of the pattern that isprojected onto an object in the region of interest; and processing theimage in order to construct a three-dimensional (3D) map of the object.30. The method according to claim 29, wherein the pattern of the spotsis uncorrelated over a range of depths that is mapped by the method. 31.The method according to claim 29, wherein scanning the beam comprisesmodulating an intensity of the beam while the scanning the beam, therebycreating the pattern of the spots on the region of interest.
 32. Themethod according to claim 31, wherein creating the pattern comprisesmodifying the pattern responsively to the image captured by the imagingmodule.
 33. The method according to claim 32, wherein modifying thepattern comprises modifying an angular density of the spots in the arraywithin a selected part of the region of interest.
 34. The methodaccording to claim 32, wherein modifying the pattern comprises modifyinga brightness of the spots in a selected area with the region ofinterest.
 35. The method according to claim 31, wherein creating thepattern comprises scanning the beam over a first angular range, andsplitting the scanned beam to create multiple, angularly-spaced replicasof the scanned beam, which together extend the pattern over a secondangular range, which is greater than the first angular range.
 36. Themethod according to claim 35, wherein splitting the scanned beamcomprises tiling the region of interest with the pattern created by themultiple, angularly-spaced replicas of the scanned beam.
 37. The methodaccording to claim 29, wherein scanning the beam comprises illuminatinga patterned element, which is configured, when illuminated by the beam,to create the pattern over a first angular range, while directing thebeam to strike the patterned element at multiple different angles insuccession so as to create multiple, angularly-spaced replicas of thepattern, which together extend over a second angular range, which isgreater than the first angular range.
 38. The method according to claim37, wherein directing the beam comprises tiling the region of interestwith the multiple, angularly-spaced replicas of the pattern.
 39. Themethod according to claim 29, wherein scanning the beam comprisesdirecting the beam, which is scanned over a first angular range, tostrike a scan-expanding element, which is configured to distribute thescanned beam so as to cover a second angular range, greater than thefirst angular range, with the spatial pattern.
 40. The method accordingto claim 39, wherein the scan-expanding element is selected from a groupof elements consisting of a convex reflector and a diffractive opticalelement.
 41. The method according to claim 29, and comprising sensingthe scanned beam at a selected angle within the angular range, andverifying the scanning by sensing the scanned beam periodically at theselected angle.
 42. The method according to claim 41, wherein scanningthe beam comprises inhibiting emission of the beam upon a failure tosense the scanned beam periodically.
 43. The method according to claim29, wherein scanning the beam comprises scanning an infrared beam, whichis modulated to create the pattern of the spots, and wherein the methodcomprises scanning a visible light beam together with the infrared beam,while modulating the visible light beam so as to project a visible imageonto the region of interest simultaneously with projecting both theinfrared beam and the visible light beam onto the region of interestsimultaneously.
 44. The method according to claim 43, wherein modulatingthe visible light beam comprises generating the visible imageresponsively to the 3D map.
 45. The method according to claim 29,wherein processing the image comprises deriving the 3D map by findingrespective offsets between the spots in areas of the captured image andcorresponding reference spot locations belonging to a reference image ofthe pattern, wherein the respective offsets are indicative of respectivedistances between the areas and the image capture assembly.
 46. Themethod according to claim 45, wherein capturing the image comprisesapplying a position-sensitive detector to sense and output an offset ofeach spot in the pattern on the object as the spot is projected by theillumination module.
 47. The method according to claim 46, whereinapplying the position-sensitive detector comprises scanning a field ofview of the position-sensitive detector in synchronization with thescanner in the illumination module.
 48. The method according to claim46, wherein applying the position-sensitive detector comprises scanninga field of view of the position-sensitive detector together with thebeam from the radiation source.
 49. The method according to claim 45,wherein the offsets that are indicative of the respective distancesoccur in a first direction, and wherein capturing the image comprisesimaging the pattern onto an array of detector elements arranged in oneor more rows extending in the first direction using astigmatic opticshaving a greater optical power in the first direction than in a second,perpendicular direction.
 50. The method according to claim 29, whereincapturing the image comprises scanning a sensing area or a sensor overthe region of interest in synchronization with the scanned beam of theillumination module.
 51. The method according to claim 50, wherein thesensor comprises an image sensor having a rolling shutter, and whereinscanning the sensing area comprises synchronizing the rolling shutterwith the scanned beam.
 52. The method according to claim 50, whereinscanning the beam comprises dynamically varying the selected angularrange, and scanning the sensing area comprises dynamically scanning thesensing area to match the selected angular range of the scanned beam.53. A method for mapping, comprising: generating a beam of radiationhaving an intensity that varies according to a specified temporalmodulation; scanning the beam over a region of interest, so as toproject the radiation onto the region with a spatial intensity patterndetermined by the temporal modulation of the beam; capturing an image ofthe spatial intensity pattern that is projected onto an object in theregion of interest; and processing the image in order to construct athree-dimensional (3D) map of the object.
 54. The method according toclaim 53, wherein the temporal modulation is binary, and wherein thespatial intensity pattern comprises an array of spots generated by thetemporal modulation.
 55. The method according to claim 53, whereinprocessing the image comprises deriving the 3D map by finding respectiveoffsets between the pattern in areas of the captured image and areference image of the pattern, wherein the respective offsets areindicative of respective distances between the areas and the imagecapture assembly.
 56. The method according to claim 53, whereincapturing the image comprises scanning a sensing area or a sensor overthe region of interest in synchronization with the scanned beam.